import request from "@/request/index.js"
//首页
export function index() {
	let url = '/api/home/index'
	return request.get(url)
}

//商城首页
export function mall() {
	let url = '/api/home/mall'
	return request.get(url)
}

//商城产品
export function mallGoods(page,size,type,name){
	let url = '/api/home/mall/goods'
	let params = {page,size,type,name}
	return request.get(url,{params})
}

//产品详情
export function goodsInfo(id){
	let url = `/api/home/mall/goods/${id}`
	return request.get(url)
}

//门店列表
export function shop(){
	let url = `/api/home/sale`
	return request.get(url)
}



//门店信息
export function shopInfo(id){
	let url = '/api/home/sale/info'
	let params = {id}
	return request.get(url,{params})
}

//门店产品
export function saleGoods(type){
	let url = '/api/home/sale/goods'
	let params = {type}
	return request.get(url,{params})
}

//门店产品详情
export function saleGoodsInfo(id){
	let url = `/api/home/sale/goods/${id}`
	return request.get(url)
}